import java.util.Scanner;


public class DeMo {
    //输出n*n的乘法口诀表，n由用户输入。
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 1;
        int j = 1;
        for(i = 1;i<=n;i++){
            for(j = 1; j <= i;j++){
                System.out.print(i+"*"+j+"="+(i*j)+" ");
            }
            System.out.println("\n");
        }
    }
    //编写代码模拟三次密码输入的场景。 最多能输入三次密码，密码正确，提示“登录成功”,密码错误，
    //可以重新输 入，最多输入三次。三次均错，则提示退出程序
    public static void main2(String[] args) {
        int n = 123456;
        int count = 0;
        while(count<3){
            Scanner scanner = new Scanner(System.in);
            int text = scanner.nextInt();
            if(n==text){
                System.out.println("right!");
                break;
            }else {
                count++;
                System.out.println("false");
            }
        }
        System.out.println("out");
    }
//求一个整数，在内存当中存储时，二进制1的个数。
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count= 0;
        while(n!=0){
            int tem = n&1;
            n=n>>1;
            if(tem==1){
                count++;
            }
        }
        System.out.println(count);
    }

//求一个整数，在内存当中存储时，二进制1的个数。
    public static void main00(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        while(n>0){
        if(((n>>1)&1)==1){
            count++;
        }
        n=n>>1;
        }
        System.out.println(count);
    }
//求出0～999之间的所有“水仙花数”并输出。(“水仙花数”是指一个三位数，其各位数字的立方和确好等于该数本 身，如；153＝1＋5＋3?，则153是一个“水仙花数“。）
    public static void main99(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int n = a;
        int sum = 0;
        int tem = 0;
        while(n!=0){
            tem=n%10;
            sum+=tem*tem*tem;
            n/=10;
        }
        if(sum==a){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }

//根据输入的年龄, 来打印出当前年龄的人是少年(低于18), 青年(19-28), 中年(29-55), 老年(56以上)
    public static void main44(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        if(year<18){
            System.out.println("tennerage");
        }else if(year>=19&&year<=28){
            System.out.println("青年");
        }else if(year>=29&&year<=55){
            System.out.println("老年");
        }else{
            System.out.println("老年");
        }
    }

    public static void main33(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int i = 0;
        int count = 0;
        for(i = 2;i < num;i++){
            if(num%i==0){
                System.out.println("No");
                return;
            }
        }
        System.out.println("Yes");
    }
//打印 1 - 100 之间所有的素数
    public static void main55(String[] args) {
        int i = 0;
        int j = 0;
        int count = 0;
        for(i = 1;i<=100;i++){
            for(j = 2;j<i;j++){
                if((i%j)==0){
                    count = 1;
                    break;
                }
            }
            if(count==0){
                System.out.println(i);
            }
            count=0;
        }
    }

//输出 1000 - 2000 之间所有的闰年
    public static void main22(String[] args) {
        int i = 0;
        for(i = 1000;i<=2000;i++){
            if((i%4==0&&i%100!=0)||(i%400==0)){
                System.out.println(i);
            }
        }
    }

    public static void main5(String[] args) {
        int j = 0;
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = scanner.nextInt();
        if(n<i){
            int tem = i;
             i = n;
             n = tem;
        }
        while(n%i!=0){
            j = n%i;
            n = i;
            i = j;
        }
        System.out.println(i);
    }

    public static void main(String[] args) {
        System.out.println("Hello Nowcoder!");
    }
}
